package day07demo;

public class Test1 {
    public static void main(String[] args) {
        for (int i = 101; i < 200; i++) {
            boolean flag = true;
            for (int j = 2; j <= i / 2; j++) {
                if (i% j == 0) {
                    flag = false;
                    break;
                }

            }
            if (flag) {
                System.out.println(i + "是一个质数");
            }
        }
























        /*for (int j = 2; j <= 200; j++) {
            boolean flag = true;
            for (int i = 2; i <= j / 2; i++) {
                if (j % i == 0) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                System.out.println(j + "是质数");
            }
        }*/
    }
}
